package com.itee.street;

import javafx.application.Application;
import javafx.application.ConditionalFeature;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Rectangle2D;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Screen;
import javafx.stage.Stage;

public class Main extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception{
        Parent root = FXMLLoader.load(getClass().getResource("controller/sample.fxml"));
        primaryStage.setTitle("调表测试工具");
        primaryStage.setOnCloseRequest(event -> {
            System.exit(-1);
        });

        boolean is3dSupported = Platform.isSupported(ConditionalFeature.SCENE3D);
        Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
        Scene scene = new Scene(root, 1000, 700, is3dSupported);

        primaryStage.setScene(scene);
//        primaryStage.setMaximized(true);
        primaryStage.show();
    }


    public static void main(String[] args) {
        launch(args);
    }
}
